package com.zzyl.controller.customer;

import com.zzyl.base.ResponseResult;
import com.zzyl.controller.BaseController;
import com.zzyl.dto.MemberDto;
import com.zzyl.service.CustomerLoginService;
import com.zzyl.vo.LoginVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/customer")
public class CustomerLoginController extends BaseController {
    @Autowired
    private CustomerLoginService customerLoginService;

    @PostMapping("/user/login")
    public ResponseResult<LoginVo> login(@RequestBody MemberDto memberDto) {
        LoginVo loginVo = customerLoginService.login(memberDto);
        return success(loginVo);
    }
}
